import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopUserBankController } from '../../../controllers';
const uctoominishopUserBankRouter = new Router();
const minishopUserBankController = new uctooMinishopUserBankController();

uctoominishopUserBankRouter.post('/add', requireUser, minishopUserBankController.add);
uctoominishopUserBankRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_user_bank'), minishopUserBankController.edit);
uctoominishopUserBankRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_user_bank'), minishopUserBankController.delete);

//For getting minishopUserBank with permission control
uctoominishopUserBankRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_user_bank'), minishopUserBankController.getSingle);
uctoominishopUserBankRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_user_bank'), minishopUserBankController.getMany);
uctoominishopUserBankRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_user_bank'), minishopUserBankController.getMany);

//#endregion AutoCreateCode
export default uctoominishopUserBankRouter;
